package com.wfs.myapp.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum UserStatusEnum {
    PENDING(0, "初始化"),
    ACTIVE(1, "激活"),
    ;

    private final Integer code;
    private final String msg;


    public static String getMsg(Integer code) {
        for (UserStatusEnum userStatusEnum : UserStatusEnum.values()) {
            if (Objects.equals(userStatusEnum.getCode(), code)) {
                return userStatusEnum.getMsg();
            }
        }
        return "";
    }
}

